<template>
  <div>
    <el-dialog title="其他入库单详情"  width="1300px" @open="open" class="icon-dialog" :visible.sync="show" :before-close="closeForm" append-to-body>
      <el-form ref="form" :model=" stkotherinform " size="small" label-width="80px" :inline="true" class="header">
        <el-row :gutter="20">
          <el-col :span="8">
            <el-form-item label="单据编号:" class="no-wrap-label">{{ stkotherinform.billNo }}</el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="称重申请单单据编号:" class="no-wrap-label" label-width="150px">{{ stkotherinform.weightNo }}</el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="日期:" class="no-wrap-label">{{ stkotherinform.date }}</el-form-item>
          </el-col>
        </el-row>

        <br />
      </el-form>

      <el-table :data="stkotherinList" height="calc(100vh - 300px)">
        <el-table-column label="单据编号" width="160" prop="billNo"></el-table-column>
        <!--        <el-table-column label="No." width="60" align="right" type="index"></el-table-column>-->
        <el-table-column label="物料编码" width="120" prop="materialNo"></el-table-column>
        <el-table-column label="物料名称" width="120" prop="materialName"></el-table-column>
        <el-table-column label="物料规格" width="120" prop="specification"></el-table-column>
        <el-table-column label="基本单位名称" width="120" prop="basicUnitName"></el-table-column>
        <el-table-column label="基本单位编码" width="120" prop="basicUnitNo"></el-table-column>
        <!--        <el-table-column label="辅助单位" width="120" prop="unitNumber"></el-table-column>-->
        <el-table-column label="批号" width="120" prop="lot"></el-table-column>
        <el-table-column label="数量" width="120" prop="qty"></el-table-column>
        <el-table-column label="仓库名称" width="120" prop="stockName"></el-table-column>
        <el-table-column label="仓库编码" width="120" prop="stockNo"></el-table-column>
        <el-table-column label="仓位名称" width="120" prop="locationName"></el-table-column>
        <el-table-column label="仓位编码" width="120" prop="locationNo"></el-table-column>
        <el-table-column label="备注" width="120" prop="note"></el-table-column>
      </el-table>


    </el-dialog>

  </div>
</template>
<script>
import { detail  } from '@/api/app/stkotherin'
export default {
	name:'stkOtherIndetail',
	props: {
		show: {
			type: Boolean,
			default: true
		},
		size: {
			type: String,
			default: 'mini'
		},
		info: {
			type: Object,
		},
	},
	data() {
		return {
			form:{
			},
      stkotherinform:{},
      stkotherinList:[]
		}
	},
	watch:{
		show(val){
			if(val){
			}
		}
	},
	methods: {
    open(){
      detail(this.info).then(res => {
        if (res.status == 200) {
          this.stkotherinform = res.data.data;
          this.stkotherinList = res.data.dataList;


        } else {
          this.$message.error('获取详情失败2，请稍后再试');
        }
      }).catch(error => {

        this.$message.error('获取详情失败，请稍后再试');
      });
		},
		closeForm(){
			this.$emit('update:show', false)
		}
	}
}
</script>
<style  lang="scss">
@import '@/assets/scss/common.scss'
</style>
